using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.Web;
using CrystalDecisions.CrystalReports;

public partial class webadmin_reports_Default : System.Web.UI.Page
{
    public static rptDataSet ds = new rptDataSet();
    Common comm = new Common();
    protected void Page_Load(object sender, EventArgs e)
    {
        CrystalDecisions.CrystalReports.Engine.ReportDocument myReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
        myReport.Load(Server.MapPath("rpt_danhsachNTV.rpt"));


        DataTable dtt = comm.getDataTable("SELECT   ma_nguoi, tai_khoan, ho_ten, dbo.fcGetDiaChiChiTiet(ho_khau) AS ho_khau, dbo.fcGetThanhPho(ho_khau) AS thanh_pho, ngay_sinh, gioi_tinh, cmnd, dien_thoai_nha, dien_thoai_di_dong, email, dia_chi_chi_tiet FROM ConNguoi_nguoi");
        DataRow dtr = null;


        //ds.ConNguoi_nguoi.Merge(dtt);

        myReport.SetDataSource(dtt);

        CrystalReportViewer1.ReportSource = myReport;
    } 
}
